﻿#region namespaces

using System;

#endregion

namespace ZOIL.DataBackend.BaseX
{
    public class EventArgsContainerEventArgs : EventArgs
    {
        public readonly EventArgs ContainingArgs;
        public readonly string Key;

        public EventArgsContainerEventArgs(string key, EventArgs containingArgs)
        {
            Key = key;
            ContainingArgs = containingArgs;
        }

        public T ContainingArgsAs<T>() where T : EventArgs
        {
            return (T) ContainingArgs;
        }
    }
}